import Cookies from "js-cookie";

let setCookies = (key, value) => {
   Cookies.set(key, value);
};

let getCookies = (key) => {
  return Cookies.get(key);
};

let delCookies = (key)=>{
  Cookies.remove(key)
}
//本地存
let setLocalStorage = (key, value) => {
  return window.localStorage.setItem(key, value);
};

//本地取
let getLocalStorage = (key) => {
  return window.localStorage.getItem(key);
};

//会话存
let setSessionStorage = (key, value) => {
  return window.sessionStorage.setItem(key, value);
};

//会话取
let getSessionStorage = (key) => {
  return window.sessionStorage.setItem(key);
};

export default {
  setLocalStorage,
  getLocalStorage,
  setSessionStorage,
  getSessionStorage,
  setCookies,
  getCookies,
  delCookies
};
